package _1._0._0._127.ormrpc.services.WSWSEmployee;

public class WSWSEmployeeSrvProxyProxy implements WSWSEmployeeSrvProxy {
    private String _endpoint = null;
    private WSWSEmployeeSrvProxy wSWSEmployeeSrvProxy = null;

    public WSWSEmployeeSrvProxyProxy() {
        _initWSWSEmployeeSrvProxyProxy();
    }

    public WSWSEmployeeSrvProxyProxy(String endpoint) {
        _endpoint = endpoint;
        _initWSWSEmployeeSrvProxyProxy();
    }

    private void _initWSWSEmployeeSrvProxyProxy() {
        try {
            wSWSEmployeeSrvProxy = (new WSWSEmployeeSrvProxyServiceLocator()).getWSWSEmployee();
            if (wSWSEmployeeSrvProxy != null) {
                if (_endpoint != null)
                    ((javax.xml.rpc.Stub) wSWSEmployeeSrvProxy)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
                else
                    _endpoint = (String) ((javax.xml.rpc.Stub) wSWSEmployeeSrvProxy)._getProperty("javax.xml.rpc.service.endpoint.address");
            }

        } catch (javax.xml.rpc.ServiceException serviceException) {
        }
    }

    public String getEndpoint() {
        return _endpoint;
    }

    public void setEndpoint(String endpoint) {
        _endpoint = endpoint;
        if (wSWSEmployeeSrvProxy != null)
            ((javax.xml.rpc.Stub) wSWSEmployeeSrvProxy)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);

    }

    public WSWSEmployeeSrvProxy getWSWSEmployeeSrvProxy() {
        if (wSWSEmployeeSrvProxy == null)
            _initWSWSEmployeeSrvProxyProxy();
        return wSWSEmployeeSrvProxy;
    }

    public void importPersonCollection(wsemployee.client.WSWSEmployee[] wsEmpCollection) throws java.rmi.RemoteException, wsemployee.client.WSInvokeException {
        if (wSWSEmployeeSrvProxy == null)
            _initWSWSEmployeeSrvProxyProxy();
        wSWSEmployeeSrvProxy.importPersonCollection(wsEmpCollection);
    }

    public void importPersonInfo(wsemployee.client.WSWSEmployee wsEmpInfo) throws java.rmi.RemoteException, wsemployee.client.WSInvokeException {
        if (wSWSEmployeeSrvProxy == null)
            _initWSWSEmployeeSrvProxyProxy();
        wSWSEmployeeSrvProxy.importPersonInfo(wsEmpInfo);
    }

    public String getAddressList(String name) throws java.rmi.RemoteException, wsemployee.client.WSInvokeException {
        if (wSWSEmployeeSrvProxy == null)
            _initWSWSEmployeeSrvProxyProxy();
        return wSWSEmployeeSrvProxy.getAddressList(name);
    }

    public String getAdminPositionByPerson(String name) throws java.rmi.RemoteException, wsemployee.client.WSInvokeException {
        if (wSWSEmployeeSrvProxy == null)
            _initWSWSEmployeeSrvProxyProxy();
        return wSWSEmployeeSrvProxy.getAdminPositionByPerson(name);
    }


}